<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width = device-width , initial-scale = 1 , minimum-scale = 1 , maximum-scale = 1 , user-scalable = no">
    <link rel="stylesheet" href="../../resource/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../resource/css/common.css">

</head>
<body>
<div id="shadow" >
    <div class="container">
        <div class="row code-content">
            <div id="code" class="">

            </div>
        </div>
    </div>
    <section class="content-wrap">
        <div class="container">
            <div class="row">
                <h1>使用优惠券,请向工作人员出示该页面</h1>
            </div>
        </div>
    </section>
</div>

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="../../resource/js/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="../../resource/js/bootstrap.min.js"></script>
<script src="../../resource/js/commonjs.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script>
    $(function () {
        isLogin();
        getUseCouponLink();
    });
    function getUseCouponLink() {
        var url = "/UserCenter/getUseCouponLink";
        var arg = {};
        arg.coupon_code = getArg("code_id");
        ajaxJsonp(url, arg, renderCode);
    }
    function renderCode(res) {
        var url = res.data.link;
        url = 'http://coupon.dotfive.cn' + url + getCookie("token");
        $("#code").qrcode({
            render: "table", //table方式
            width: 150, //宽度
            height:150, //高度
            text: url //任意内容
        });
        $("#shadow").show();
    }
</script>
</body>
</html>